<template>
  <view
    :style="'direction:' + $t('dir')"
    :class="$t('dir') == 'rtl' ? 'rtl' : 'ltr'"
  >
    <navbar
      :title="$t('yollax')"
      :back="true"
      :customStyle="';background: linear-gradient(#c8f1ff,#edefff);'"
    >
    </navbar>

    <bkk />
    <!-- يۈكلىنىۋاتقان ئايلانما بەلگىسى -->
    <view class="loading-overlay" v-if="isLoading">
      <view class="skeleton-container">
        <view class="skeleton-image"></view>
        <view class="skeleton-text"></view>
        <view class="skeleton-input"></view>
        <view class="skeleton-input"></view>
        <view class="skeleton-text"></view>
        <view class="skeleton-input"></view>
        <view class="skeleton-text"></view>
        <view class="skeleton-input"></view>
        <view class="skeleton-text"></view>
        <view class="skeleton-input"></view>
        <view class="skeleton-input"></view>
        <view class="skeleton-input"></view>
        <view class="skeleton-text"></view>
      </view>
    </view>

    <view class="contai" v-show="!isLoading">
      <!-- {{ "id" + id + ",subid" + subid + ",u_id" + u_id }} -->
      <!-- رەسىملەر -->
      <view class="container text-center">
        <view class="title"
          >{{ $t("dir") == "rtl" ? "رەسىم" : "图片" }}
          <text
            v-if="
              u_id == 4 ||
              u_id == 5 ||
              u_id == 6 ||
              u_id == 7 ||
              u_id == 8 ||
              u_id == 9 ||
              u_id == 10 ||
              u_id == 11 ||
              u_id == 12 ||
              u_id == 13 ||
              u_id == 14 ||
              u_id == 15 ||
              u_id == 16 ||
              u_id == 40 ||
              u_id == 41
            "
          >
            {{ " " }} {{ $t("dir") == "rtl" ? "（ ئىختىارى  ）" : "选填" }}
          </text></view
        >
        <view class="media-list">
          <view
            class="image-item"
            v-for="(item, index) in formData.subimg"
            :key="index"
          >
            <image :src="baseUrl + '/' + item" mode="aspectFill" />
            <view class="delete-btn" @click="deleteImage(index)">
              <u-icon name="close" color="#ffffff" size="20"></u-icon>
            </view>
          </view>

          <view
            class="upload-btn"
            @click="chooseImage"
            v-if="images.length < 9"
          >
            <u-icon name="camera" size="24" color="#455EF7"></u-icon>
            <text>{{ $t("dir") == "rtl" ? "رەسىم" : "图片" }}</text>
            <text>({{ images.length }}/9)</text>
          </view>
        </view>
      </view>
      <!-- assi uqur -->
      <view class="container">
        <view class="title text-center">{{
          $t("dir") == "rtl" ? "ئاساسى ئۇچۇر" : "主要信息"
        }}</view>
        <view class="cell">
          <u-cell
            @click="showOrunPopup"
            :title="$t('dir') == 'rtl' ? 'رايون تاللاڭ ' : '选择地区'"
            :isLink="true"
            :arrow-direction="popupOrun ? 'up' : 'down'"
            :value="selectedCity ? selectedCity.label : $t('tallang')"
          ></u-cell>
        </view>
        <!-- adrisi   -->
        <view
          class="cell"
          v-if="
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <view class="title1">{{
            $t("dir") == "rtl" ? " ئادرىسى" : "详细地址"
          }}</view>
          <u--input
            :inputAlign="$t('dir') == 'rtl' ? 'right' : 'left'"
            :placeholder="
              $t('dir') == 'rtl' ? 'تەپسىلى ئورنىنى تولدۇرۇڭ' : '请输入内容...'
            "
            border="bottom"
            v-model="formData.full_address"
          ></u--input>
        </view>

        <!-- يېشى -->
        <view class="cell" v-if="u_id == 8">
          <u-cell
            @click="showYaxPopup"
            :title="$t('dir') == 'rtl' ? 'يېشى' : '年龄'"
            :isLink="true"
            :arrow-direction="popupYax ? 'up' : 'down'"
            :value="
              formData.age
                ? formData.age + ($t('dir') == 'rtl' ? ' ياش' : '岁')
                : $t('tallang')
            "
          ></u-cell>
        </view>

        <!-- جىنسى -->
        <view class="cell" v-if="u_id == 8">
          <u-cell
            @click="showJinsPopup"
            :title="$t('dir') == 'rtl' ? 'جىنسى' : '性别'"
            :isLink="true"
            :arrow-direction="popupJins ? 'up' : 'down'"
            :value="
              jinsValue
                ? $t('dir') == 'rtl'
                  ? jinsValue.label
                  : jinsValue.labelCn
                : $t('tallang')
            "
          ></u-cell>
        </view>

        <!-- ئوقۇش تارىخى -->
        <view class="cell" v-if="u_id == 8">
          <u-cell
            @click="showOkusPopup"
            :title="$t('dir') == 'rtl' ? 'ئوقۇش تارىخى' : '学历'"
            :isLink="true"
            :arrow-direction="popupOkus ? 'up' : 'down'"
            :value="okusValue ? okusValue.label : $t('tallang')"
          ></u-cell>
        </view>

        <!-- خىزمەت تەجرىبىسى -->
        <view class="cell" v-if="u_id == 8">
          <view class="title1">خىزمەت تەجرىبىسى</view>
          <u--input
            :inputAlign="$t('dir') == 'rtl' ? 'right' : 'left'"
            :placeholder="
              $t('dir') == 'rtl'
                ? 'خىزمەت تەجرىبىڭىزنى تولدۇرۇڭ'
                : '请填写佛南工作经验...'
            "
            border="bottom"
            v-model="formData.work_experience"
          ></u--input>
        </view>

        <!-- كەسپى -->
        <view class="cell" v-if="u_id == 8">
          <view class="title1">كەسپى</view>
          <u--input
            :inputAlign="$t('dir') == 'rtl' ? 'right' : 'left'"
            :placeholder="
              $t('dir') == 'rtl' ? 'كەسپىڭىزنى تولدۇرۇڭ' : '请填写职业...'
            "
            border="bottom"
            v-model="formData.profession"
          ></u--input>
        </view>

        <!-- مائاش تەلىپى -->
        <view class="cell" v-if="u_id == 8">
          <u-cell
            @click="showMaaxPopup"
            :title="$t('dir') == 'rtl' ? 'مائاش تەلىپى' : '薪资要求'"
            :isLink="true"
            :arrow-direction="popupMaax ? 'up' : 'down'"
            :value="
              maaxValue
                ? $t('dir') == 'rtl'
                  ? maaxValue.label
                  : maaxValue.labelCn
                : $t('tallang')
            "
          ></u-cell>
        </view>
        <!-- kolam2   -->
        <view
          class="cell"
          v-if="
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <view class="title1">{{
            $t("dir") == "rtl" ? " كۆلىمى" : "面积"
          }}</view>
          <u--input
            :inputAlign="$t('dir') == 'rtl' ? 'right' : 'left'"
            :placeholder="
              $t('dir') == 'rtl' ? 'قانچە مو قانچە پۇڭ،لى' : '几亩地...'
            "
            border="bottom"
            v-model="formData.geometry"
          ></u--input>
        </view>
        <!-- maxina marka  -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 34 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <view class="title1">{{
            $t("dir") == "rtl" ? " ماشىنا ماركىسى" : "车牌"
          }}</view>
          <u--input
            :inputAlign="$t('dir') == 'rtl' ? 'right' : 'left'"
            :placeholder="
              $t('dir') == 'rtl' ? 'مەسىلەن ؛ تويوتا' : '如：丰田...'
            "
            border="bottom"
            v-model="formData.car_name"
          ></u--input>
        </view>
        <!-- maxina tip  -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 34 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <view class="title1">{{
            $t("dir") == "rtl" ? " ماشىنا تىپى" : "车型"
          }}</view>
          <u--input
            :inputAlign="$t('dir') == 'rtl' ? 'right' : 'left'"
            :placeholder="
              $t('dir') == 'rtl' ? 'مەسىلەن ؛ كوروللا' : '如：卡罗拉...'
            "
            border="bottom"
            v-model="formData.car_model"
          ></u--input>
        </view>
        <!-- maxina yili  -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 34 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <u-cell
            @click="showyili1"
            :title="$t('dir') == 'rtl' ? ' ماشىنا يىلى' : '年限'"
            :isLink="true"
            :arrow-direction="showYil ? 'up' : 'down'"
            :value="formData.car_year == '' ? $t('tallang') : formData.car_year"
          ></u-cell>
        </view>
        <!-- maxina suhurta  -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 34 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <u-cell
            @click="showBaoxian1"
            :title="$t('dir') == 'rtl' ? 'سۇغۇرتا' : '保险'"
            :isLink="true"
            :arrow-direction="showBaoxian ? 'up' : 'down'"
            :value="
              formData.car_limits == '' ? $t('tallang') : formData.car_limits
            "
          ></u-cell>
        </view>
        <!-- maxina takxurux  -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 34 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <u-cell
            @click="showTakxurux1"
            :title="$t('dir') == 'rtl' ? 'يىللىق تەكشۈرۈش' : '年审'"
            :isLink="true"
            :arrow-direction="showTakxurux ? 'up' : 'down'"
            :value="
              formData.car_vehicle_inspection == ''
                ? $t('tallang')
                : formData.car_vehicle_inspection
            "
          ></u-cell>
        </view>
        <!-- maxina sarpiyat  -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 34 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <view class="title1">{{
            $t("dir") == "rtl" ? " سەرپىياتى" : "排量"
          }}</view>
          <u--input
            :inputAlign="$t('dir') == 'rtl' ? 'right' : 'left'"
            :placeholder="$t('dir') == 'rtl' ? 'مەسىلەن 1.8T ' : '如：1.8T...'"
            border="bottom"
            v-model="formData.car_fuel"
          ></u--input>
        </view>
        <!-- maxina hot xakli  -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 34 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <u-cell
            @click="showMaysarpiPopup"
            :title="$t('dir') == 'rtl' ? 'خوت شەكلى' : '挡型'"
            :isLink="true"
            :arrow-direction="popupMaysarpi ? 'up' : 'down'"
            :value="maysarpiValue ? maysarpiValue.label : $t('tallang')"
          ></u-cell>
        </view>
        <!-- gaz bar yok -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 34 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <u-cell
            @click="showGazPopup"
            :title="$t('dir') == 'rtl' ? 'يېقىلغۇ تۈرى' : '燃料'"
            :isLink="true"
            :arrow-direction="popupGaz ? 'up' : 'down'"
            :value="gazValue ? gazValue.label : $t('tallang')"
          ></u-cell>
        </view>
        <!-- hizmat axhana kobul kildihan orun   -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 34 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <view class="title1">{{
            $t("dir") == "rtl" ? "قوبۇل قىلىدىغان ئورۇن" : "工作地点"
          }}</view>
          <u--input
            :inputAlign="$t('dir') == 'rtl' ? 'right' : 'left'"
            :placeholder="
              $t('dir') == 'rtl' ? 'قوبۇل قىلىدىغان ئورۇن نامى' : '请输入'
            "
            border="bottom"
            v-model="formData.job_orun"
          ></u--input>
        </view>
        <!-- hizmat axhana kobul kildihan tur   -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 34 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <view class="title1">{{
            $t("dir") == "rtl" ? "قوبۇل قىلىدىغان تۈر" : "工作类型"
          }}</view>
          <u--input
            :inputAlign="$t('dir') == 'rtl' ? 'right' : 'left'"
            :placeholder="
              $t('dir') == 'rtl' ? 'قوبۇل قىلىدىغان تۈر ' : '请输入'
            "
            border="bottom"
            v-model="formData.job_type"
          ></u--input>
        </view>
        <!-- hizmat axhana kobul kildihan adam san  -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 34 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <u-cell
            @click="showAdamSanPopup"
            :title="$t('dir') == 'rtl' ? 'ئادەم سانى' : '人数'"
            :isLink="true"
            :arrow-direction="popupAdamSan ? 'up' : 'down'"
            :value="
              formData.person_num == 0
                ? $t('toldurung')
                : formData.person_num + 'نەپەر'
            "
          ></u-cell>
        </view>
        <!-- kawatsani -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 34 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <u-cell
            @click="showKawat1"
            :title="$t('dir') == 'rtl' ? 'قەۋەت سانى' : '层数'"
            :isLink="true"
            :arrow-direction="showKawat ? 'up' : 'down'"
            :value="kawat == '' ? $t('toldurung') : kawat"
          ></u-cell>
        </view>
        <!-- kolimi -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 4 &&
            u_id != 34 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <u-cell
            @click="showKolamPopup"
            :title="$t('dir') == 'rtl' ? 'كۆلىمى' : '面积（平方）'"
            :isLink="true"
            :arrow-direction="popupKolam ? 'up' : 'down'"
            :value="
              formData.square == 0
                ? $t('toldurung')
                : formData.square + $t('dir') == 'rtl'
                ? 'كىۋادردت'
                : '平方'
            "
          ></u-cell>
        </view>
        <!-- ياتاق -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 34 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <u-cell
            @click="showyatakPopup"
            :title="$t('dir') == 'rtl' ? 'ياتاق' : '室'"
            :isLink="true"
            :arrow-direction="popupyatak ? 'up' : 'down'"
            :value="formData.room == 0 ? $t('toldurung') : formData.room"
          ></u-cell>
        </view>
        <!-- زال -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 34 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <u-cell
            @click="showzalPopup"
            :title="$t('dir') == 'rtl' ? 'زال' : '厅'"
            :isLink="true"
            :arrow-direction="popupzal ? 'up' : 'down'"
            :value="formData.hall == 0 ? $t('toldurung') : formData.hall"
          ></u-cell>
        </view>
        <!-- ئەسلەھە -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 4 &&
            u_id != 5 &&
            u_id != 34 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 17 &&
            u_id != 18 &&
            u_id != 19 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <u-cell
            @click="showAslihaPopup"
            :title="$t('dir') == 'rtl' ? 'ئەسلىھەلىرى' : '设施'"
            :isLink="true"
            :arrow-direction="popupAsliha ? 'up' : 'down'"
            :value="aslihaValue ? aslihaValue.label : $t('tallang')"
          ></u-cell>
        </view>
        <!-- ئۆتكۈزۈش مۇددىتى -->
        <view class="cell" v-if="u_id == 34">
          <u-cell
            @click="showOtPopup"
            :title="$t('dir') == 'rtl' ? 'ئۆتكۈزۈش مۇددىتى' : '转让年限'"
            :isLink="true"
            :arrow-direction="popupOt ? 'up' : 'down'"
            :value="
              formData.transfer_year
                ? formData.transfer_year + ($t('dir') == 'rtl' ? ' يىل' : '年')
                : $t('tallang')
            "
          ></u-cell>
        </view>
        <!-- ھۆددىگە بېرىش تۈرى -->
        <view class="cell" v-if="u_id == 40">
          <u-cell
            @click="showHoddiPopup"
            :title="$t('dir') == 'rtl' ? 'ھۆددىگە بېرىش تۈرى' : '转让类型'"
            :isLink="true"
            :arrow-direction="popupHoddi ? 'up' : 'down'"
            :value="
              hoddiValue
                ? $t('dir') == 'rtl'
                  ? hoddiValue.label
                  : hoddiValue.labelCn
                : $t('tallang')
            "
          ></u-cell>
        </view>
        <!-- بېزىلىشى -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 34 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 20 &&
            u_id != 21 &&
            u_id != 22 &&
            u_id != 23 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <u-cell
            @click="showBezakPopup"
            :title="$t('dir') == 'rtl' ? 'بېزىلىشى' : '装修'"
            :isLink="true"
            :arrow-direction="popupBezak ? 'up' : 'down'"
            :value="bezakValue ? bezakValue.label : $t('tallang')"
          ></u-cell>
        </view>
        <!-- بانكا قەرىزى -->
        <view
          class="cell"
          v-if="
            u_id != 40 &&
            u_id != 41 &&
            u_id != 1 &&
            u_id != 2 &&
            u_id != 34 &&
            u_id != 3 &&
            u_id != 4 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 20 &&
            u_id != 24 &&
            u_id != 25 &&
            u_id != 26 &&
            u_id != 27 &&
            u_id != 28 &&
            u_id != 29 &&
            u_id != 30 &&
            u_id != 31 &&
            u_id != 32 &&
            u_id != 33 &&
            u_id != 35 &&
            u_id != 36 &&
            u_id != 37 &&
            u_id != 38 &&
            u_id != 39
          "
        >
          <u-cell
            @click="showBankaPopup"
            :title="$t('dir') == 'rtl' ? 'بانكا قەرىزى ' : '贷款'"
            :isLink="true"
            :arrow-direction="popupBanka ? 'up' : 'down'"
            :value="bankaValue ? bankaValue.label : $t('tallang')"
          ></u-cell>
        </view>
        <!--  باھاسى -->
        <view
          class="cell"
          v-if="
            u_id != 4 &&
            u_id != 5 &&
            u_id != 6 &&
            u_id != 7 &&
            u_id != 8 &&
            u_id != 9 &&
            u_id != 10 &&
            u_id != 11 &&
            u_id != 12 &&
            u_id != 13 &&
            u_id != 14 &&
            u_id != 15 &&
            u_id != 16 &&
            u_id != 41
          "
        >
          <u-cell
            @click="showBahaPopup"
            :title="$t('dir') == 'rtl' ? 'باھاسى' : '价格'"
            :isLink="true"
            :arrow-direction="popupbaha ? 'up' : 'down'"
            :value="formData.price == 0 ? $t('tallang') : formData.price"
          ></u-cell>
        </view>
        <!-- baxka tapsilat   -->
        <view class="cell">
          <view class="title1">{{
            $t("dir") == "rtl" ? " تەپسىلاتى" : "详细信息"
          }}</view>
          <u--textarea
            height="120"
            count
            maxlength="1000"
            v-model="formData.info_content"
            :inputAlign="$t('dir') == 'rtl' ? 'right' : 'left'"
            :placeholder="
              $t('dir') == 'rtl'
                ? 'ئۇچۇر تەپسىلاتلىرىنى تولدۇرۇڭ'
                : '请输入详细信息...'
            "
          ></u--textarea>
        </view>
        <!-- ئۆي سانى -->
        <view class="cell" v-if="u_id == 25">
          <u-cell
            @click="showOySanPopup"
            :title="$t('dir') == 'rtl' ? 'ئۆي سانى' : '房屋数量'"
            :isLink="true"
            :arrow-direction="popupOySan ? 'up' : 'down'"
            :value="
              formData.house_num == 0
                ? $t('toldurung')
                : formData.house_num + 'ئېغىز'
            "
          ></u-cell>
        </view>
        <!-- ئىجارە شەكلى -->
        <view class="cell" v-if="u_id == 24 || u_id == 25">
          <u-cell
            @click="showEjaraPopup"
            :title="$t('dir') == 'rtl' ? 'ئىجارە شەكلى' : '租赁方式'"
            :isLink="true"
            :arrow-direction="popupEjara ? 'up' : 'down'"
            :value="
              ejaraValue
                ? $t('dir') == 'rtl'
                  ? ejaraValue.label
                  : ejaraValue.labelCn
                : $t('tallang')
            "
          ></u-cell>
        </view>
      </view>
      <!-- alaka uqur -->
      <view class="container">
        <view class="title text-center">{{
          $t("dir") == "rtl" ? "ئالاقە نومۇرى" : "联系方式"
        }}</view>
        <!-- yanfun nomur -->
        <view class="cell">
          <view class="title1">{{
            $t("dir") == "rtl" ? " يانفۇن نومۇر" : "手机号"
          }}</view>
          <u--input
            inputAlign="center"
            type="number"
            :placeholder="
              $t('dir') == 'rtl' ? 'تېلفۇن نومۇر تولدۇرۇڭ' : '请输入手机号'
            "
            maxlength="11"
            border="bottom"
            v-model="formData.mobile"
          ></u--input>
        </view>
        <!-- ekkilik code -->
        <view class="cell">
          <view class="title1">{{
            $t("dir") == "rtl" ? "ئۈندىدار ئىككىلىك كودى" : "微信二维码"
          }}</view>
          <view class="qrcodebox">
            <image
              @click="chooseQRCode"
              :src="
                formData.wechat_code_url || '../../static/images/qrcode.png'
              "
              mode="aspectFit"
              class="qrcode"
            />
          </view>
        </view>
      </view>
      <view class="container" v-if="!formData.edit">
        <view class="title text-center" v-if="isFirstPost == 0">{{
          $t("dir") == "rtl" ? "ئۈنۈملۈك ۋاقتى" : "曝光时间"
        }}</view>
        <view class="cell" v-if="isFirstPost == 0">
          <view class="toast" v-for="item in payres" :key="item.id">
            <text v-if="selectedbaha == item.id">
              {{ $t("dir") == "rtl" ? item.title : item.title_cn }}
              <text style="color: red; padding: 10px; font-weight: 900"
                >{{ item.price }}
              </text>
              {{ $t("dir") == "rtl" ? "يۇەن" : "元" }}
            </text>
          </view>
          <view class="bahacontai">
            <view
              v-for="item in payres"
              :key="item.id"
              class="bahaitem"
              :class="{ active: selectedbaha == item.id }"
              @tap="
                selectedbaha = item.id;
                selectBaha(item);
              "
            >
              <text>{{ $t("dir") == "rtl" ? item.title : item.title_cn }}</text>
            </view>
          </view>
        </view>
        <view v-else class="free-post">
          <view class="free-content">
            <view class="free-badge">
              <text class="badge-text">{{
                $t("dir") == "rtl" ? "تۇنجى قېتىملىق ئۇچۇر ھەقسىز" : "首次免费"
              }}</text>
            </view>
          </view>
        </view>
      </view>
    </view>
    <!-- يوللاش كۇنۇپكىسى -->
    <view class="submit-btn" :class="{ active: canSubmit }" @click="submitPost">
      <text>{{ $t("dir") == "rtl" ? "يوللاش" : "发布" }}</text>
    </view>
    <!-- ئۆي سانى popup -->
    <u-popup
      :show="popupOySan"
      @close="popupOySan = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
      }"
    >
      <div class="dir-ltr">
        <keyboard-price
          type="number"
          v-model.number="formData.house_num"
          :confirmText="$t('dir') == 'rtl' ? 'جەزىملەش' : '确定'"
          :closeIcon="{
            class: '',
            icon: $t('dir') == 'rtl' ? 'تاقاش' : '关闭',
          }"
          :backIcon="{
            class: '',
            icon: $t('dir') == 'rtl' ? 'يۇيۇش' : '回退',
          }"
          @onDone="oySanTallax"
        />
      </div>
    </u-popup>
    <!-- ئىجارە شەكلى popup -->
    <u-popup
      :show="popupEjara"
      @close="popupEjara = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff, #ffffff99,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
        height: '75vh',
      }"
    >
      <view class="popup-content">
        <view
          v-for="item in ejaraList"
          :key="item.value"
          class="city-item"
          @click="selectEjara(item)"
        >
          <text>{{ $t("dir") == "rtl" ? item.label : item.labelCn }}</text>
        </view>
      </view>
    </u-popup>
    <!-- orun tallax popup -->
    <u-popup
      :show="popupOrun"
      @close="popupOrun = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff, #ffffff99,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
        height: '75vh',
      }"
    >
      <view class="popup-content">
        <text class="popup-head"></text>
        <view
          v-for="city in orunList"
          :key="city.value"
          class="city-item"
          @click="selectCity(city)"
        >
          <text>{{ city.label }}</text>
        </view>
      </view>
    </u-popup>
    <!-- kawat tallax picker -->
    <u-picker
      immediateChange="true"
      confirmColor="#000000"
      cancelColor="#000000"
      :show="showKawat"
      ref="kawatpicker"
      :columns="$t('dir') == 'rtl' ? kawatColumn.ug : kawatColumn.zh"
      @confirm="onkawatConfirm"
      @change="onkawatpickerchange"
      @cancel="showKawat = false"
      :confirmText="$t('dir') == 'rtl' ? 'جەزىملەش' : '确定'"
      :cancelText="$t('dir') == 'rtl' ? 'قالدۇرۇش' : '取消'"
    ></u-picker>
    <!-- kolam kirguzux popup -->
    <u-popup
      :show="popupKolam"
      @close="popupKolam = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
      }"
    >
      <div class="dir-ltr">
        <keyboard-price
          type="digit"
          v-model="formData.square"
          :confirmText="$t('dir') == 'rtl' ? 'جەزىملەش' : '确定'"
          :closeIcon="{
            class: '',
            icon: $t('dir') == 'rtl' ? 'تاقاش' : '关闭',
          }"
          :backIcon="{
            class: '',
            icon: $t('dir') == 'rtl' ? 'يۇيۇش' : '回退',
          }"
          @onDone="popupKolam = false"
        />
      </div>
    </u-popup>
    <!-- adam san  kirguzux popup -->
    <u-popup
      :show="popupAdamSan"
      @close="popupAdamSan = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
      }"
    >
      <div class="dir-ltr">
        <keyboard-price
          type="number"
          v-model.number="formData.person_num"
          :confirmText="$t('dir') == 'rtl' ? 'جەزىملەش' : '确定'"
          :closeIcon="{
            class: '',
            icon: $t('dir') == 'rtl' ? 'تاقاش' : '关闭',
          }"
          :backIcon="{
            class: '',
            icon: $t('dir') == 'rtl' ? 'يۇيۇش' : '回退',
          }"
          @onDone="adamSanTallax(value)"
        />
      </div>
    </u-popup>
    <!-- yatak kirguzux popup -->
    <u-popup
      :show="popupyatak"
      @close="popupyatak = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
      }"
    >
      <div class="dir-ltr">
        <keyboard-price
          type="digit"
          v-model="formData.room"
          :confirmText="$t('dir') == 'rtl' ? 'جەزىملەش' : '确定'"
          :closeIcon="{
            class: '',
            icon: $t('dir') == 'rtl' ? 'تاقاش' : '关闭',
          }"
          :backIcon="{
            class: '',
            icon: $t('dir') == 'rtl' ? 'يۇيۇش' : '回退',
          }"
          @onDone="popupyatak = false"
        />
      </div>
    </u-popup>
    <!-- zal kirguzux popup -->
    <u-popup
      :show="popupzal"
      @close="popupzal = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
      }"
    >
      <div class="dir-ltr">
        <keyboard-price
          type="digit"
          v-model="formData.hall"
          :confirmText="$t('dir') == 'rtl' ? 'جەزىملەش' : '确定'"
          :closeIcon="{
            class: '',
            icon: $t('dir') == 'rtl' ? 'تاقاش' : '关闭',
          }"
          :backIcon="{
            class: '',
            icon: $t('dir') == 'rtl' ? 'يۇيۇش' : '回退',
          }"
          @onDone="popupzal = false"
        />
      </div>
    </u-popup>
    <!-- bezilixi tallax popup -->
    <u-popup
      :show="popupBezak"
      @close="popupBezak = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff, #ffffff99,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
        height: '75vh',
      }"
    >
      <view class="popup-content">
        <view
          v-for="bezak in bezakList"
          :key="bezak.value"
          class="city-item"
          @click="selectBezak(bezak)"
        >
          <text>{{ bezak.label }}</text>
        </view>
      </view>
    </u-popup>
    <!-- asliha tallax popup -->
    <u-popup
      :show="popupAsliha"
      @close="popupAsliha = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff, #ffffff99,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
        height: '75vh',
      }"
    >
      <view class="popup-content">
        <view
          v-for="asliha in aslihaList"
          :key="asliha.value"
          class="city-item"
          @click="selectAsliha(asliha)"
        >
          <text>{{ asliha.label }}</text>
        </view>
      </view>
    </u-popup>
    <!-- banka tallax popup -->
    <u-popup
      :show="popupBanka"
      @close="popupBanka = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff, #ffffff99,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
        height: '75vh',
      }"
    >
      <view class="popup-content">
        <view
          v-for="banka in bankaList"
          :key="banka.value"
          class="city-item"
          @click="selectBanka(banka)"
        >
          <text>{{ banka.label }}</text>
        </view>
      </view>
    </u-popup>
    <!-- bahasi kirguzux popup -->
    <u-popup
      :show="popupbaha"
      @close="popupbaha = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
      }"
    >
      <div class="dir-ltr">
        <keyboard-price
          type="digit"
          v-model="formData.price"
          :confirmText="$t('dir') == 'rtl' ? 'جەزىملەش' : '确定'"
          :closeIcon="{
            class: '',
            icon: $t('dir') == 'rtl' ? 'تاقاش' : '关闭',
          }"
          :backIcon="{
            class: '',
            icon: $t('dir') == 'rtl' ? 'يۇيۇش' : '回退',
          }"
          @onDone="popupbaha = false"
        />
        <view class="face-price" @click="handleFacePrice">
          <text>{{ $t("dir") == "rtl" ? "يۈزتۇرانە" : "面议" }}</text>
        </view>
      </div>
    </u-popup>
    <!-- maxinia yili  -->
    <u-datetime-picker
      :show="showYil"
      mode="year-month"
      :confirmText="$t('dir') == 'rtl' ? 'جەزىملەش' : '确定'"
      :cancelText="$t('dir') == 'rtl' ? 'قالدۇرۇش' : '取消'"
      :minDate="631152000000"
      @confirm="onConfirm1"
      @cancel="showYil = false"
    ></u-datetime-picker>
    <!-- maxinia boxan  -->
    <u-datetime-picker
      :show="showBaoxian"
      mode="year-month"
      :confirmText="$t('dir') == 'rtl' ? 'جەزىملەش' : '确定'"
      :cancelText="$t('dir') == 'rtl' ? 'قالدۇرۇش' : '取消'"
      :minDate="631152000000"
      @confirm="onConfirm2"
      @cancel="showBaoxian = false"
    ></u-datetime-picker>
    <!-- maxinia takxurux  -->
    <u-datetime-picker
      :show="showTakxurux"
      mode="year-month"
      :confirmText="$t('dir') == 'rtl' ? 'جەزىملەش' : '确定'"
      :cancelText="$t('dir') == 'rtl' ? 'قالدۇرۇش' : '取消'"
      :minDate="631152000000"
      @confirm="onConfirm3"
      @cancel="showTakxurux = false"
    ></u-datetime-picker>
    <!-- may sarpiyati popup -->
    <u-popup
      :show="popupMaysarpi"
      @close="popupMaysarpi = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff, #ffffff99,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
        height: '75vh',
      }"
    >
      <view class="popup-content">
        <view
          v-for="item in maysarpiList"
          :key="item.value"
          class="city-item"
          @click="selectMaysarpi(item)"
        >
          <text>{{ item.label }}</text>
        </view>
      </view>
    </u-popup>
    <!-- gaz popup -->
    <u-popup
      :show="popupGaz"
      @close="popupGaz = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff, #ffffff99,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
        height: '75vh',
      }"
    >
      <view class="popup-content">
        <view
          v-for="item in gazList"
          :key="item.value"
          class="city-item"
          @click="selectGaz(item)"
        >
          <text>{{ item.label }}</text>
        </view>
      </view>
    </u-popup>
    <!-- phone popup -->
    <u-popup
      :show="showPhonePopup"
      safeAreaInsetBottom="false"
      @close="showPhonePopup = false"
      mode="center"
      :closeable="false"
      :customStyle="{
        background:
          'linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85))',
        borderRadius: '24rpx',
        padding: '30rpx',
        backdropFilter: 'blur(10px)',
        boxShadow: '0 8rpx 32rpx rgba(0, 0, 0, 0.1)',
      }"
    >
      <view class="phone-popup-content">
        <view class="phone-title">
          {{
            $t("dir") == "rtl"
              ? "ئۇچۇرنىڭ ھەقىقىي بولۇشى ۋە باشقىلارنىڭ سىز بىلەن توغرا ئالاقىلىشى ئۈچۈن تېلېفون نومۇرىڭىزنى ئېلىشقا مۇھتاجمىز"
              : "为了确保信息真实性和方便联系，需要获取您的手机号"
          }}
        </view>
        <button
          class="phone-btn"
          open-type="getPhoneNumber"
          @getphonenumber="getPhoneNumber"
        >
          {{ $t("dir") == "rtl" ? "بىر كۇنۇپكا بىلەن ئېرىشىش" : "一键获取" }}
        </button>
      </view>
    </u-popup>
    <!-- يېشى popup -->
    <u-popup
      :show="popupYax"
      @close="popupYax = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff, #ffffff99,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
        height: '75vh',
      }"
    >
      <view class="popup-content">
        <view
          v-for="item in yaxList"
          :key="item.value"
          class="city-item"
          @click="selectYax(item)"
        >
          <text>{{ item.label }}</text>
        </view>
      </view>
    </u-popup>
    <!-- جىنسى popup -->
    <u-popup
      :show="popupJins"
      @close="popupJins = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff, #ffffff99,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
        height: '75vh',
      }"
    >
      <view class="popup-content">
        <view
          v-for="item in jinsList"
          :key="item.value"
          class="city-item"
          @click="selectJins(item)"
        >
          <text>{{ item.label }}</text>
        </view>
      </view>
    </u-popup>
    <!-- ئوقۇش تارىخى popup -->
    <u-popup
      :show="popupOkus"
      @close="popupOkus = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff, #ffffff99,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
        height: '75vh',
      }"
    >
      <view class="popup-content">
        <view
          v-for="item in okusList"
          :key="item.value"
          class="city-item"
          @click="selectOkus(item)"
        >
          <text>{{ item.label }}</text>
        </view>
      </view>
    </u-popup>
    <!-- مائاش تەلىپى popup -->
    <u-popup
      :show="popupMaax"
      @close="popupMaax = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff, #ffffff99,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
        height: '75vh',
      }"
    >
      <view class="popup-content">
        <view
          v-for="item in maaxList"
          :key="item.value"
          class="city-item"
          @click="selectMaax(item)"
        >
          <text>{{ item.label }}</text>
        </view>
      </view>
    </u-popup>
    <!-- يېشى picker -->
    <u-picker
      :show="popupYax"
      :columns="yaxColumn"
      @confirm="onYaxConfirm"
      @cancel="popupYax = false"
      :confirmText="$t('dir') == 'rtl' ? 'جەزىملەش' : '确定'"
      :cancelText="$t('dir') == 'rtl' ? 'قالدۇرۇش' : '取消'"
    ></u-picker>
    <!-- ئۆي سانى popup -->
    <u-popup
      :show="popupOySan"
      @close="popupOySan = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
      }"
    >
      <div class="dir-ltr">
        <keyboard-price
          type="number"
          v-model.number="formData.house_num"
          :confirmText="$t('dir') == 'rtl' ? 'جەزىملەش' : '确定'"
          :closeIcon="{
            class: '',
            icon: $t('dir') == 'rtl' ? 'تاقاش' : '关闭',
          }"
          :backIcon="{
            class: '',
            icon: $t('dir') == 'rtl' ? 'يۇيۇش' : '回退',
          }"
          @onDone="oySanTallax"
        />
      </div>
    </u-popup>
    <!-- يىللىق مۇددەت popup -->
    <u-popup
      :show="popupYil"
      @close="popupYil = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff, #ffffff99,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
        height: '75vh',
      }"
    >
      <view class="popup-content">
        <view
          v-for="item in yilList"
          :key="item.value"
          class="city-item"
          @click="selectYil(item)"
        >
          <text>{{ $t("dir") == "rtl" ? item.label : item.labelCn }}</text>
        </view>
      </view>
    </u-popup>
    <!-- ئۆتكۈزۈش مۇددىتى picker -->
    <u-picker
      :show="popupOt"
      :columns="otColumn"
      @confirm="onOtConfirm"
      @cancel="popupOt = false"
      :confirmText="$t('dir') == 'rtl' ? 'جەزىملەش' : '确定'"
      :cancelText="$t('dir') == 'rtl' ? 'قالدۇرۇش' : '取消'"
    ></u-picker>
    <!-- ھۆددىگە بېرىش تۈرى popup -->
    <u-popup
      :show="popupHoddi"
      @close="popupHoddi = false"
      mode="bottom"
      :customStyle="{
        background: 'linear-gradient(45deg,#fff, #ffffff99,#fff);',
        borderTopLeftRadius: '24rpx',
        borderTopRightRadius: '24rpx',
        height: '75vh',
      }"
    >
      <view class="popup-content">
        <view
          v-for="item in hoddiList"
          :key="item.value"
          class="city-item"
          @click="selectHoddi(item)"
        >
          <text>{{ $t("dir") == "rtl" ? item.label : item.labelCn }}</text>
        </view>
      </view>
    </u-popup>
  </view>
</template>
<script>
import keyboardPrice from "../../components/liujto-keyboard/liujto-keyboard-price.vue";
import config from "@/utils/config";
import { p } from "../../uni_modules/uview-ui/libs/util/dayjs";
export default {
  components: {
    keyboardPrice,
  },
  data() {
    return {
      u_id: null,
      payres: [],
      selectedbaha: null,
      baseUrl: config.baseUrl,
      kawat: "",
      yatak: "",
      kawatColumn: {
        ug: [
          Array.from({ length: 37 }, (_, i) => `${i + 1}قەۋەتلىك بىنا`),
          Array.from({ length: 37 }, (_, i) => `${i + 1}-قەۋەت`),
        ],
        zh: [
          Array.from({ length: 37 }, (_, i) => `${i + 1}层楼`),
          Array.from({ length: 37 }, (_, i) => `第${i + 1}层`),
        ],
      },
      showKawat: false,
      bankaValue: "",
      bezakValue: "",
      aslihaValue: "",
      adamSanValue: "",
      orunList: [
        {
          Code: "658410",
          labelCn: "库尔勒市",
          label: "كورلا شەھىرى",
          value: 1,
        },
        {
          Code: "658410",
          labelCn: "轮台县",
          label: "بۈگۈر",
          value: 2,
        },
        {
          Code: "658410",
          labelCn: "尉犁",
          label: "لوپنۇر",
          value: 3,
        },
        {
          Code: "658410",
          labelCn: "若羌县",
          label: "چاقىلىق",
          value: 4,
        },
        {
          Code: "658410",
          labelCn: "且末县",
          label: "چەرچەن",
          value: 5,
        },
        {
          Code: "658410",
          labelCn: "焉耆",
          label: "قاراشەھەر",
          value: 6,
        },
        {
          Code: "658410",
          labelCn: "和静县",
          label: "خېجىڭ",
          value: 7,
        },
        {
          Code: "658410",
          labelCn: "和硕县",
          label: "خوشۇت",
          value: 8,
        },
        {
          Code: "658410",
          labelCn: "博湖",
          label: "باغراش",
          value: 9,
        },
      ],
      bezakList: [
        {
          labelCn: "无装修",
          label: "بېزەلمىگەن",
          value: 1,
        },
        {
          labelCn: "简单装修",
          label: "ئاددى بېزەلگەن",
          value: 2,
        },
        {
          labelCn: "普通装修",
          label: "ئوتتۇراھال بېزەلگەن",
          value: 3,
        },
        {
          labelCn: "精装",
          label: "ئالاھىدە بېزەلگەن",
          value: 4,
        },
      ],
      bankaList: [
        {
          labelCn: "可以贷款",
          label: "بولىدۇ",
          value: 1,
        },
        {
          labelCn: "不能贷款",
          label: "بولمايدۇ",
          value: 2,
        },
      ],
      aslihaList: [
        {
          labelCn: "有设施",
          label: "ئەسلىھەلىرى بار",
          value: 1,
        },
        {
          labelCn: "无设施",
          label: "قۇرۇق دۇكان",
          value: 2,
        },
      ],
      id: null,
      subid: null,
      content: "",
      images: [], // يەرلىك رەسىم ئادرېسلىرى
      serverImages: [], // مۇلازىمېتىردىكى رەسىم ئادرېسلىرىنى ساقلاش

      formData: {
        _subid: 0,
        _id: 0,
        edit: false,
        subimg: [],
        person_num: 0,
        square: 0,
        room: 0,
        hall: 0,
        price: 0,
        wechat_code: "", //paqisi
        wechat_code_url: "", //putuni
        info_content: "",
        info_content_cn: "",
        work_experience: "",
        work_experience_cn: "",
        profession: "",
        house_num: 0,
        age: 0,
        gender: 0,
        wages: 0,
        loan: 0,
        rent_type: 0,
        transfer_type: 0,
        yinglax_sani: 0,
        pay_price: 0,
        degree: -1,
        address: 0,
        fitment: 0,
        title_cn: "",
        title: "",
        car_fuel: "",
        car_name: "",
        facility: 0,
        geometry: "",
        car_model: "",
        car_limits: 0,
        car_trachea: 0,
        full_address: "",
        full_address_cn: "",
        car_gear_type: 0,
        number_floors: 0,
        transfer_year: 0,
        car_vehicle_inspection: 0, // ماشىنا تەكشۈرۈش ۋاقتى
        car_year: 0, // ماشىنا يىلى
        job_orun: "", // خىزمەت ئورنى
        job_type: "", // خىزمەت تۈرى
      },
      isSubmitting: false,
      selectedCity: "",
      popupOrun: false,
      popupKolam: false,
      popupAdamSan: false,
      popupyatak: false,
      popupzal: false,
      popupbaha: false,
      popupBezak: false,
      popupBanka: false,
      popupAsliha: false,
      showYil: false,
      showBaoxian: false,
      showTakxurux: false,
      maysarpiList: [
        {
          labelCn: "自动挡",
          label: "ئاپتوماتىك",
          value: 1,
        },

        {
          labelCn: "手动挡",
          label: "قول خوت",
          value: 2,
        },
      ],
      maysarpiValue: "",
      popupMaysarpi: false,
      gazList: [
        {
          labelCn: "纯汽油",
          label: "ساپ مايلىق",
          value: 1,
        },
        {
          labelCn: "带气管",
          label: "گاز ئورۇنتىلغان",
          value: 2,
        },
        {
          labelCn: "采油",
          label: "سەلەركە",
          value: 3,
        },
        {
          labelCn: "纯电",
          label: "ساپ توكلۇق",
          value: 4,
        },
        {
          labelCn: "油电混动",
          label: "توك مايلق",
          value: 5,
        },
      ],
      gazValue: "",
      popupGaz: false,
      showPhonePopup: false,
      yaxList: [
        { value: 1, label: "16-25" },
        { value: 2, label: "26-35" },
        { value: 3, label: "36-45" },
        { value: 4, label: "46-55" },
        { value: 5, label: "56-65" },
      ],
      yaxValue: null,
      popupYax: false,

      jinsList: [
        {
          labelCn: "男",
          label: "ئوغۇل",
          value: 1,
        },
        {
          labelCn: "女",
          label: "قىز",
          value: 2,
        },
      ],
      jinsValue: null,
      popupJins: false,

      okusList: [
        { value: 0, label: "ئوقۇمىغان", lebelCn: "无" },
        { value: 1, label: "باشلانغۇچ", lebelCn: "小学" },
        { value: 2, label: "تولۇقسىز", lebelCn: "初中" },
        { value: 3, label: "تولۇق ئوتتۇرا", lebelCn: "高中" },
        { value: 4, label: "ئالى مەكتەپ", lebelCn: "大学" },
      ],
      okusValue: null,
      popupOkus: false,

      maaxList: [
        {
          labelCn: "面议",
          label: "يۈزتۇرانە",
          value: 1,
        },
        {
          labelCn: "3000以下",
          label: "3000دىن تۆۋەن",
          value: 2,
        },
        {
          labelCn: "3000-5000",
          label: "3000-5000",
          value: 3,
        },
        {
          labelCn: "5000-8000",
          label: "5000-8000",
          value: 4,
        },
        {
          labelCn: "8000-10000",
          label: "8000-10000",
          value: 5,
        },
        {
          labelCn: "10000以上",
          label: "10000دىن يۇقىرى",
          value: 6,
        },
      ],
      maaxValue: null,
      popupMaax: false,
      yaxColumn: [Array.from({ length: 50 }, (_, i) => `${i + 16}`)],
      popupOySan: false,
      ejaraList: [
        {
          labelCn: "月租",
          label: "ئايلىق",
          value: 1,
        },
        {
          labelCn: "年租",
          label: "يىللىق",
          value: 2,
        },
      ],
      ejaraValue: "",
      popupEjara: false,
      yilList: Array.from({ length: 30 }, (_, i) => ({
        labelCn: `${i + 1}年`,
        label: `${i + 1} يىل`,
        value: i + 1,
      })),
      yilValue: "",
      popupYil: false,
      otColumn: [
        Array.from(
          { length: 30 },
          (_, i) => `${i + 1} ${this.$t("dir") == "rtl" ? "يىل" : "年"}`
        ),
      ],
      popupOt: false,
      hoddiList: [
        {
          labelCn: "转让",
          label: "ھۆددىگە بېرىش",
          value: 1,
        },
        {
          labelCn: "过户",
          label: "تېگىدىن ئۆتۈنۈپ بېرىش",
          value: 2,
        },
      ],
      hoddiValue: "",
      popupHoddi: false,
      canSubmit: false, // تاپشۇرۇشقا بولامدۇ
      isLoading: true,
      loadmoreStatus: "loadmore",
      current_page: 1,
      last_page: 1,
      expandedCard: null,
      uhturux: {
        title: "مۇھىم ئۇقتۇرۇش",
        title_cn: "重要通知",
      },
      dataList: [],
      isFirstPost: 0,
      pageReady: false,
    };
  },
  async onLoad(e) {
    console.log("yollax111", e);
    console.log("yollax", e.id);
    console.log("yollax", e.subid);
    console.log("yollax", e.urqrId);
    if (e.subid == null) {
      this.formData._subid = 0;
      this.subid = e.subid;
    }
    if (e.edit) {
      this.formData.edit = true;
      this.urqrId = e.urqrId;

      try {
        // ئۇچۇرنى يۈكلەش
        const res = await this.$uniapi("/get_information/?id=" + this.urqrId);
        console.log("تەھرىرلەش ئۇچۇرى:", res);

        if (res.code === 200) {
          const info = res.list;

          // formData غا قىممەتلەرنى تولدۇرۇش
          this.formData = {
            ...this.formData,
            id: info.id,
            title: info.title,
            info_content: info.info_content,
            info_content_cn: info.info_content_cn,
            address: info.address,
            full_address: info.full_address,
            mobile: info.mobile,
            price: info.price,
            facility: info.facility,
            number_floors: this.formatNumberFloors(info.number_floors),
            geometry: info.geometry,
            square: info.square,
            room: info.room,
            hall: info.hall,
            transfer_year: info.transfer_year,
            transfer_type: info.transfer_type,
            fitment: info.fitment,
            loan: info.loan,
            house_num: info.house_num,
            rent_type: info.rent_type,
            car_name: info.car_name,
            car_model: info.car_model,
            car_year: info.car_year,
            car_vehicle_inspection: info.car_vehicle_inspection,
            car_trachea: info.car_trachea,
            car_fuel: info.car_fuel,
            car_limits: info.car_limits,
            car_gear_type: info.car_gear_type,
            age: info.age,
            gender: info.gender,
            degree: info.degree,
            work_experience: info.work_experience,
            profession: info.profession,
            wages: info.wages,
            job_orun: info.job_orun,
            job_type: info.job_type,
            person_num: info.person_num,
            wechat_code: info.wechat_code,
            wechat_code_url: info.wechat_code_url,
            subimg:
              typeof info.subimg === "string"
                ? JSON.parse(info.subimg)
                : Array.isArray(info.subimg)
                ? info.subimg
                : [],
          };
          if (info.number_floors) {
            this.kawat = this.formatNumberFloors(info.number_floors);
          }
          if (info.rent_type) {
            const selectedRentType = this.ejaraList.find(
              (item) => item.value === info.rent_type
            );
            if (selectedRentType) {
              this.ejaraValue = selectedRentType;
            }
          }
          // رەسىملەرنى تەڭشەش
          if (info.mainimg) {
            this.mainImage = info.mainimg;
          }
          // رەسىملەر ماسسىۋىنى تەڭشەش
          if (info.subimg) {
            try {
              this.images =
                typeof info.subimg === "string"
                  ? JSON.parse(info.subimg)
                  : Array.isArray(info.subimg)
                  ? info.subimg
                  : [];
              this.serverImages = [...this.images];
            } catch (err) {
              console.error("قوشۇمچە رەسىملەرنى تەجزىيلەشتە خاتالىق:", err);
              this.images = [];
              this.serverImages = [];
            }
          }
          if (info.fitment) {
            const selectedFitment = this.bezakList.find(
              (item) => item.value === info.fitment
            );
            if (selectedFitment) {
              this.bezakValue = selectedFitment;
            }
          }
          if (info.transfer_type) {
            const selectedTransferType = this.hoddiList.find(
              (item) => item.value === info.transfer_type
            );
            if (selectedTransferType) {
              this.hoddiValue = selectedTransferType;
            }
          }
          // رايون تاللاش قىممىتىنى تەڭشەش
          if (info.address) {
            const selectedRegion = this.orunList.find(
              (item) => item.value === info.address
            );
            if (selectedRegion) {
              this.selectedCity = selectedRegion;
            }
          }
          if (info.wages) {
            const selectedWages = this.maaxList.find(
              (item) => item.value === info.wages
            );
            if (selectedWages) {
              this.maaxValue = selectedWages;
            }
          }
          if (info.gender) {
            const selectedGender = this.jinsList.find(
              (item) => item.value === info.gender
            );
            if (selectedGender) {
              this.jinsValue = selectedGender;
            }
          }
          if (info.degree) {
            const selectedDegree = this.okusList.find(
              (item) => item.value === info.degree
            );
            if (selectedDegree) {
              this.okusValue = selectedDegree;
            }
          }
          // ئەسلىھە قىممىتىنى تەڭشەش
          if (info.facility) {
            const selectedFacility = this.aslihaList.find(
              (item) => item.value === info.facility
            );
            if (selectedFacility) {
              this.aslihaValue = selectedFacility;
            }
          }
          // ماشىنا قورال تىپى قىممىتىنى تەڭشەش
          if (info.car_gear_type) {
            const selectedGearType = this.maysarpiList.find(
              (item) => item.value === info.car_gear_type
            );
            if (selectedGearType) {
              this.maysarpiValue = selectedGearType;
            }
          }
          // ماشىنا باك تىپى قىممىتىنى تەڭشەش
          if (info.car_trachea) {
            const selectedTrachea = this.gazList.find(
              (item) => item.value === info.car_trachea
            );
            if (selectedTrachea) {
              this.gazValue = selectedTrachea;
            }
          }
          // قەرز ھالىتى قىممىتىنى تەڭشەش
          if (info.loan) {
            const selectedLoan = this.bankaList.find(
              (item) => item.value === info.loan
            );
            if (selectedLoan) {
              this.bankaValue = selectedLoan;
            }
          }
          uni.showToast({
            title: this.$t("dir") == "rtl" ? "ئۇچۇر يۈكلەندى" : "加载成功",
            icon: "success",
          });
        } else {
          uni.showToast({
            title:
              res.msg ||
              (this.$t("dir") == "rtl"
                ? "ئۇچۇر يۈكلەش مەغلۇپ بولدى"
                : "加载失败"),
            icon: "none",
          });
        }
      } catch (err) {
        console.error("ئۇچۇر يۈكلەشتە خاتالىق كۆرۈلدى:", err);
        uni.showToast({
          title: this.$t("dir") == "rtl" ? "تور خاتالىقى" : "网络错误",
          icon: "none",
        });
      }
    }

    this.id = e.id;
    this.subid = e.subid;
    this.formData._id = e.id;
    this.formData._subid = e.subid;
    // u_id نى ھېسابلاش
    let u_id = null;
    const id = parseInt(e.id);
    const subid = parseInt(e.subid);

    if (id === 1) {
      if (subid === 1) u_id = 1;
      else if (subid === 2) u_id = 2;
      else if (subid === 3) u_id = 3;
    } else if (id === 2) {
      if (subid === 1) u_id = 4;
      else if (subid === 2) u_id = 5;
      else if (subid === 3) u_id = 6;
      else if (subid === 4) u_id = 7;
    } else if (id === 3) u_id = 8;
    else if (id === 4) {
      if (subid === 1) u_id = 9;
      else if (subid === 2) u_id = 10;
      else if (subid === 3) u_id = 11;
      else if (subid === 4) u_id = 12;
      else if (subid === 5) u_id = 13;
      else if (subid === 6) u_id = 14;
      else if (subid === 7) u_id = 15;
      else if (subid === 8) u_id = 16;
    } else if (id === 5) {
      if (subid === 1) u_id = 17;
      else if (subid === 2) u_id = 18;
      else if (subid === 3) u_id = 19;
      else if (subid === 4) u_id = 20;
    } else if (id === 6) {
      if (subid === 1) u_id = 21;
      else if (subid === 2) u_id = 22;
      else if (subid === 3) u_id = 23;
    } else if (id === 7) {
      if (subid === 1) u_id = 24;
      else if (subid === 2) u_id = 25;
    } else if (id === 8) {
      if (subid === 1) u_id = 26;
      else if (subid === 2) u_id = 27;
      else if (subid === 3) u_id = 28;
      else if (subid === 4) u_id = 29;
    } else if (id === 9) {
      if (subid === 1) u_id = 30;
      else if (subid === 2) u_id = 31;
      else if (subid === 3) u_id = 32;
    } else if (id === 10) {
      if (subid === 1) u_id = 33;
      else if (subid === 2) u_id = 34;
    } else if (id === 11) u_id = 35;
    else if (id === 12) {
      if (subid === 1) u_id = 36;
      else if (subid === 2) u_id = 37;
      else if (subid === 3) u_id = 38;
    } else if (id === 13) u_id = 39;
    else if (id === 14) u_id = 40;
    else if (id === 15) u_id = 41;

    this.u_id = u_id;
    console.log("u_id:", u_id);

    this._paylist();

    // تېلېفون نومۇرىنى تەكشۈرۈش
    const userMobile = uni.getStorageSync("user");
    console.log("userMobile", userMobile);
    // let isFirstPost = userMobile.info_status;
    // this.isFirstPost = isFirstPost;
    // this.formData.info_status = isFirstPost;
    if (!userMobile.mobile) {
      this.showPhonePopup = true;
    } else {
      this.formData.mobile = userMobile.mobile;
    }
    try {
      const res = await this.$uniapi("/get_info_status");
      this.isFirstPost = res.list.info_status;
      this.formData.info_status = res.list.info_status;
    } catch (err) {
      console.error("Error checking first post status:", err);
    }

    // ئاساسىي مەزمۇننى كۆرسىتىش
    setTimeout(() => {
      this.pageReady = true;
    }, 100);

    try {
      this.isLoading = true;
      // ئاساسىي سانلىق مەلۇماتلارنى يۈكلەش
      await Promise.all([this.loadInitialData(), this.loadSecondaryData()]);
    } finally {
      // يۈكلەش تاماملانغاندا ئايلانما بەلگىسىنى يوشۇرۇش
      setTimeout(() => {
        this.isLoading = false;
      }, 300);
    }
  },
  onReady() {
    console.log("onReady", this.formData);
  },
  onShow() {},
  onPullDownRefresh() {
    uni.stopPullDownRefresh();
  },
  onReachBottom() {},
  computed: {
    // يوللاش كۇنۇپكىسىنىڭ ئاكتىپ ھالىتىنى ھېسابلاش
    isFormValid() {
      const u_id = this.u_id;
      let isValid = true;

      // ئاساسىي تەكشۈرۈش
      if (this.formData.address === 0) {
        isValid = false;
      }

      // ئۇچۇر تۈرىگە قاراپ تەكشۈرۈش
      if (u_id === 21 || u_id === 22 || u_id === 23) {
        isValid = !!(
          this.formData.car_name &&
          this.formData.car_model &&
          this.formData.car_year &&
          this.formData.car_limits &&
          this.formData.car_vehicle_inspection &&
          this.formData.car_fuel &&
          this.formData.car_trachea &&
          this.formData.loan &&
          this.formData.price &&
          this.formData.info_content
        );
        if (u_id === 21) {
          isValid = isValid && !!this.formData.car_gear_type;
        }
      }

      // باشقا تۈرلەر ئۈچۈن تەكشۈرۈش
      if (!this.formData.edit && this.formData.yinglax_sani === 0) {
        isValid = false;
      }

      if (!this.formData.mobile && !this.formData.wechat_code) {
        isValid = false;
      }

      return isValid;
    },
  },
  methods: {
    async _paylist() {
      await this.$uniapi("/get_pay_list").then((res) => {
        if (res.code == 200) {
          console.log("payres", res.list);
          this.payres = res.list;
        }
      });
    },
    adamSanTallax(e) {
      this.popupAdamSan = false;
      console.log("adamsax", e);
    },
    chooseQRCode() {
      this.$u.route({
        url: "/components/u-avatar-cropper/u-avatar-cropper",
        params: {
          destWidth: 1000,
          rectWidth: 300,
          fileType: "jpg",
          keyName: "qrcode",
        },
      });
    },
    onkawatConfirm(e) {
      console.log("confirm", e.value);
      this.kawat = e.value;
      this.formData.number_floors = e.value;
      this.showKawat = false;
      this.showKawat1();
      setTimeout(() => {
        this.showKawat = false;
      }, 20);
    },
    onkawatpickerchange(e) {
      const {
        columnIndex,
        value,
        values, // values为当前变化列的数组内容
        index,
        picker = this.$refs.kawatpicker, // 微信小程序无法将picker实例传出来，只能通过ref操作
      } = e;
      console.log(e);
    },
    showKawat1(e) {
      console.log("man haddangma ");
      this.showKawat = true;
    },
    showyili1(e) {
      this.showYil = true;
    },
    showBaoxian1(e) {
      this.showBaoxian = true;
    },
    showTakxurux1(e) {
      this.showTakxurux = true;
    },
    showKolamPopup() {
      this.popupKolam = true;
    },
    showAdamSanPopup() {
      this.popupAdamSan = true;
    },
    showOrunPopup() {
      this.popupOrun = true;
    },

    showyatakPopup() {
      this.popupyatak = true;
    },
    showzalPopup() {
      this.popupzal = true;
    },
    showBahaPopup() {
      this.popupbaha = true;
    },
    showBezakPopup() {
      this.popupBezak = true;
    },
    showAslihaPopup() {
      this.popupAsliha = true;
    },
    showBankaPopup() {
      this.popupBanka = true;
    },
    selectAsliha(asliha) {
      this.aslihaValue = asliha;
      this.formData.facility = asliha.value;
      console.log("asliha", asliha);
      this.closePopup();
    },
    selectBezak(bezak) {
      this.bezakValue = bezak;
      this.formData.fitment = bezak.value;
      this.closePopup();
    },
    selectCity(city) {
      this.selectedCity = city;
      this.formData.address = city.value;
      this.closePopup();
    },
    selectBanka(banka) {
      this.bankaValue = banka;
      this.formData.loan = banka.value;
      this.popupBanka = false;
    },
    closePopup() {
      this.popupOrun = false;
      this.popupKolam = false;
      this.popupAdamSan = false;
      this.popupBezak = false;
      this.popupBanka = false;
      this.popupAsliha = false;
    },
    async chooseImage() {
      console.log("besildi");

      try {
        const res = await uni.chooseImage({
          count: 9 - this.images.length,
          sizeType: ["compressed"],
          sourceType: ["album", "camera"],
        });

        // رەسىملەرنى يوللاش
        for (let tempFilePath of res.tempFilePaths) {
          await this.uploadImage(tempFilePath);
        }
      } catch (err) {
        console.error("رەسىم تاللاشتا خاتالىق:", err);
        uni.showToast({
          title: this.$t("dir") == "rtl" ? "تاللاش مەغلۇپ بولدى" : "上传失败",
          icon: "none",
        });
      }
    },

    // رەسىم يوللاش
    async uploadImage(tempFilePath) {
      console.log("يوللىنىدىغان رەسىم:", tempFilePath);
      console.log("API ئادرېسى:", this.baseUrl + "/api/upload_img");

      uni.showLoading({
        title: this.$t("dir") == "rtl" ? "يوللىنىۋاتىدۇ..." : "发布中...",
      });

      try {
        const uploadRes = await uni.uploadFile({
          url: this.baseUrl + "/api/upload_img",
          filePath: tempFilePath,
          name: "file",
          header: {
            "content-type": "multipart/form-data",
            openid: uni.getStorageSync("openid"),
          },
          formData: {
            type: "photo",
          },
        });

        console.log("مۇلازىمېتىر جاۋابى:", uploadRes);
        const res = JSON.parse(uploadRes.data);

        if (res.code === 200) {
          // پەقەت URL نىلا ساقلايمىز
          const imageUrl = res.list.data.fullUrl || res.data;
          // يەرلىك ۋە مۇلازىمېتىر ئادرېسلىرىنى ساقلاش
          this.images.push(tempFilePath);
          this.formData.subimg.push(res.list.data.url);
          this.serverImages.push(imageUrl); // پەقەت URL نى قوشىمىز

          uni.showToast({
            title: this.$t("dir") == "rtl" ? "رەسىم يوللاندى" : "发布成功",
            icon: "none",
          });
        } else {
          throw new Error(res.msg || "رەسىم يوللاش مەغلۇپ بولدى");
        }
      } catch (err) {
        console.error("رەسىم يوللاشتا خاتالىق:", err);
        uni.showToast({
          title: err.message || "رەسىم يوللاش مەغلۇپ بولدى",
          icon: "none",
        });
      } finally {
        uni.hideLoading();
      }
    },

    // رەسىم ئۆچۈرۈش
    deleteImage(index) {
      this.formData.subimg.splice(index, 1);
      this.serverImages.splice(index, 1);
    },

    // مەزمۇن يوللاش
    async submitPost() {
      let u_id = this.u_id;
      if (this.isSubmitting) {
        console.log("ھازىر يوللاۋاتىدۇ، قايتا مەشغۇلات قىلىش چەكلەندى!");
        return;
      }
      //rasimlani takxurtakxurux
      if (
        u_id != 4 &&
        u_id != 5 &&
        u_id != 6 &&
        u_id != 7 &&
        u_id != 8 &&
        u_id != 9 &&
        u_id != 10 &&
        u_id != 11 &&
        u_id != 12 &&
        u_id != 13 &&
        u_id != 14 &&
        u_id != 15 &&
        u_id != 16 &&
        u_id != 40 &&
        u_id != 41
      ) {
        if (this.images.length === 0) {
          uni.showToast({
            title: this.$t("dir") == "rtl" ? "رەسىم قوشۇڭ" : "请添加图片",
            icon: "none",
          });
          return;
        }
      }

      if (this.formData.address == 0) {
        uni.showToast({
          title: this.$t("dir") == "rtl" ? "رايون تاللاڭ" : "请选择地区",
          icon: "none",
        });
        return;
      }
      if (u_id == 1 || u_id == 2 || u_id == 3) {
        if (this.formData.full_address == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "تەپسىلى ئادرىسىنى تاللاڭ"
                : "请选择详细地址",
            icon: "none",
          });
          return;
        }
        if (this.formData.square == 0) {
          uni.showToast({
            title: this.$t("dir") == "rtl" ? "كۆلىمىنى تولدۇرۇڭ" : "请填写面积",
            icon: "none",
          });
          return;
        }
        if (this.formData.facility == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "ئەسلىھەلىرىنى تاللاڭ"
                : "请选择设施是否齐全",
            icon: "none",
          });
          return;
        }
        if (this.formData.price == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "سېتىش ياكى ئىجارە بېرىش باھاسىنى تولدۇرۇڭ"
                : "请填写售价或者租价",
            icon: "none",
          });
          return;
        }
        if (this.formData.info_content == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "ئۇچۇر تەپسىلاتىنى تولدۇرۇڭ"
                : "请填写信息详情",
            icon: "none",
          });
          return;
        }
      }
      if (u_id == 4 || u_id == 5 || u_id == 6 || u_id == 7) {
        if (this.formData.job_orun == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "قوبۇل قىلىدىغان ئورۇننى تولدۇرۇڭ"
                : "请填写岗位",
            icon: "none",
          });
          return;
        }
        if (this.formData.job_type == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "قوبۇل قىلىدىغان خىزمەت تۈرىنى تولدۇرۇڭ"
                : "请填写受理工作",
            icon: "none",
          });
          return;
        }
        if (this.formData.person_num == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "قانچە ئادەم قوبۇل قىلىدىغانلىقىنى تولدۇرۇڭ"
                : "请输入受理人数",
            icon: "none",
          });
          return;
        }

        if (this.formData.info_content == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "ئۇچۇر تەپسىلاتىنى تولدۇرۇڭ"
                : "请填写信息详情",
            icon: "none",
          });
          return;
        }
      }
      if (u_id == 8) {
        if (this.formData.age == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl" ? "يېشىڭىزنى تولدۇرۇڭ" : "请填写年龄",
            icon: "none",
          });
          return;
        }

        if (this.formData.gender == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl" ? "جىنسىڭىزنى تولدۇرۇڭ" : "请填写性别",
            icon: "none",
          });
          return;
        }

        if (this.formData.degree < 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "ئوقۇش تارىخىڭىزنى تولدۇرۇڭ"
                : "请填写性别",
            icon: "none",
          });
          return;
        }

        if (this.formData.degree < 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "ئوقۇش تارىخىڭىزنى تولدۇرۇڭ"
                : "请填写性别",
            icon: "none",
          });
          return;
        }

        if (this.formData.work_experience == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "خىزمەت تەجرىبىڭىزنى تولدۇرۇڭ"
                : "请填写信息详情",
            icon: "none",
          });
          return;
        }

        if (this.formData.wages == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "مائاش تەلىپىڭىزنى كىرگۈزۈڭ"
                : "请填写工资要求",
            icon: "none",
          });
          return;
        }

        if (this.formData.info_content == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "خىزمەت ئۇچۇر تەپسىلاتىنى تولدۇرۇڭ"
                : "请填写信息详情",
            icon: "none",
          });
          return;
        }
      }
      if (
        u_id == 9 ||
        u_id == 10 ||
        u_id == 11 ||
        u_id == 12 ||
        u_id == 13 ||
        u_id == 14 ||
        u_id == 15 ||
        u_id == 16
      ) {
        if (this.formData.info_content == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? " ئۇچۇر تەپسىلاتىنى تولدۇرۇڭ"
                : "请填写信息详情",
            icon: "none",
          });
          return;
        }
      }
      if (u_id == 17 || u_id == 18) {
        if (this.formData.full_address == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "تەپسىلى ئادرىسىنى تاللاڭ"
                : "请选择详细地址",
            icon: "none",
          });
          return;
        }
        if (this.formData.number_floors == 0) {
          uni.showToast({
            title: this.$t("dir") == "rtl" ? " قەۋەت تاللاڭ" : "请选择楼层",
            icon: "none",
          });
          return;
        }
        if (this.formData.square == 0) {
          uni.showToast({
            title: this.$t("dir") == "rtl" ? "كۆلىمىنى تولدۇرۇڭ" : "请填写面积",
            icon: "none",
          });
          return;
        }
        if (this.formData.room == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl" ? "ياتاق سانىنىى تولدۇرۇڭ" : "请选择户型",
            icon: "none",
          });
          return;
        }
        if (this.formData.hall == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl" ? "زال سانىنىى تولدۇرۇڭ" : "请选择户型",
            icon: "none",
          });
          return;
        }
        if (this.formData.fitment == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? " بېزەك ھالىتىنى تاللاڭ"
                : "请选择装修等级",
            icon: "none",
          });
          return;
        }

        if (this.formData.loan == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "بانكا قەرىزى بولامدۇ؟"
                : "请填写贷款信息",
            icon: "none",
          });
          return;
        }
        if (this.formData.price == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "سېتىش ياكى ئىجارە بېرىش باھاسىنى تولدۇرۇڭ"
                : "请填写售价或者租价",
            icon: "none",
          });
          return;
        }

        if (this.formData.info_content == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? " ئۇچۇر تەپسىلاتىنى تولدۇرۇڭ"
                : "请填写信息详情",
            icon: "none",
          });
        }
      }
      if (u_id == 19 || u_id == 20) {
        if (this.formData.full_address == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "تەپسىلى ئادرىسىنى تاللاڭ"
                : "请选择详细地址",
            icon: "none",
          });
          return;
        }
        if (this.formData.geometry == "") {
          uni.showToast({
            title: this.$t("dir") == "rtl" ? "كۆلىمىنى تولدۇرۇڭ" : "请填写面积",
            icon: "none",
          });
          return;
        }

        if (u_id == 19 && this.formData.fitment == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? " بېزەك ھالىتىنى تاللاڭ"
                : "请选择装修等级",
            icon: "none",
          });
          return;
        }

        if (u_id == 19 && this.formData.loan == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "بانكا قەرىزى بولامدۇ؟"
                : "请填写贷款信息",
            icon: "none",
          });
          return;
        }
        if (this.formData.price == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "سېتىش ياكى ئىجارە بېرىش باھاسىنى تولدۇرۇڭ"
                : "请填写售价或者租价",
            icon: "none",
          });
          return;
        }

        if (this.formData.info_content == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? " ئۇچۇر تەپسىلاتىنى تولدۇرۇڭ"
                : "请填写信息详情",
            icon: "none",
          });
          return;
        }
      }
      if (u_id == 21 || u_id == 22 || u_id == 23) {
        if (this.formData.car_name == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? " ماشىنا ماركىسىنى تولدۇرۇڭ"
                : "请填写车辆品牌",
            icon: "none",
          });
          return;
        }
        if (this.formData.car_model == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? " ماشىنا تىپىنى تولدۇرۇڭ"
                : "请填写车辆类型",
            icon: "none",
          });
          return;
        }
        if (this.formData.car_year == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "  ماشىنا يىلىنى تاللاڭ"
                : "请填写车辆年份",
            icon: "none",
          });
          return;
        }
        if (this.formData.car_limits == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? " سۇغۇرتا ۋاقتىنى تاللاڭ"
                : "请选择保险到期日期",
            icon: "none",
          });
          return;
        }
        if (this.formData.car_vehicle_inspection == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? " يىللىق تەكشۈرۈش ۋاقتىنى تاللاڭ"
                : "请选择车辆年检日期",
            icon: "none",
          });
          return;
        }
        if (this.formData.car_fuel == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl" ? "سەرپىياتىنى تاللاڭ" : "请选择排量",
            icon: "none",
          });
          return;
        }
        if (u_id == 21 && this.formData.car_gear_type == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "خوت شەكلىنى تاللاڭ"
                : "请选择变速箱类型",
            icon: "none",
          });
          return;
        }
        if (this.formData.car_trachea == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "يېقىلغۇ تۈرىنى تاللاڭ"
                : "请选择燃料类型",
            icon: "none",
          });
          return;
        }
        if (this.formData.loan == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "بانكا قەرىزى بولامدۇ؟"
                : "请填写贷款信息",
            icon: "none",
          });
          return;
        }
        if (this.formData.price == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "سېتىش باھاسىنى تولدۇرۇڭ"
                : "请填写售价",
            icon: "none",
          });
          return;
        }
        if (this.formData.info_content == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "ئۇچۇر تەپسىلاتىنى تولدۇرۇڭ"
                : "请填写信息详情",
            icon: "none",
          });
          return;
        }
      }
      if (u_id == 24 || u_id == 25) {
        if (this.formData.full_address == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "تەپسىلى ئادرىسىنى تاللاڭ"
                : "请选择详细地址",
            icon: "none",
          });
          return;
        }
        if (u_id == 24 && this.formData.number_floors == 0) {
          uni.showToast({
            title: this.$t("dir") == "rtl" ? " قەۋەت تاللاڭ" : "请选择楼层",
            icon: "none",
          });
          return;
        }
        if (u_id == 24 && this.formData.square == 0) {
          uni.showToast({
            title: this.$t("dir") == "rtl" ? "كۆلىمىنى تولدۇرۇڭ" : "请填写面积",
            icon: "none",
          });
          return;
        }
        if (u_id == 24 && this.formData.room == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl" ? "ياتاق سانىنىى تولدۇرۇڭ" : "请选择户型",
            icon: "none",
          });
          return;
        }
        if (u_id == 24 && this.formData.hall == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl" ? "زال سانىنىى تولدۇرۇڭ" : "请选择户型",
            icon: "none",
          });
          return;
        }
        if (this.formData.price == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "ئايلق ئىجارە باھاسىنى تولدۇرۇڭ"
                : "请填写租价",
            icon: "none",
          });
          return;
        }
        if (u_id == 25 && this.formData.house_num == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl" ? "ئۆي سانىنى تولدۇرۇڭ" : "请填写户数",
            icon: "none",
          });
          return;
        }
        if (this.formData.info_content == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "ئۇچۇر تەپسىلاتىنى تولدۇرۇڭ"
                : "请填写信息详情",
            icon: "none",
          });
          return;
        }
        if (this.formData.rent_type == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "ئىجارە شەكلىنى تاللاڭ"
                : "请选择租赁方式",
            icon: "none",
          });
          return;
        }
      }
      if (
        u_id == 26 ||
        u_id == 27 ||
        u_id == 28 ||
        u_id == 29 ||
        u_id == 30 ||
        u_id == 31 ||
        u_id == 32 ||
        u_id == 33 ||
        u_id == 35 ||
        u_id == 36 ||
        u_id == 37 ||
        u_id == 38 ||
        u_id == 39
      ) {
        if (this.formData.price == 0) {
          uni.showToast({
            title: this.$t("dir") == "rtl" ? "باھاسىنى تولدۇرۇڭ" : "请填写售价",
            icon: "none",
          });
          return;
        }
        if (this.formData.info_content == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "ئۇچۇر تەپسىلاتىنى تولدۇرۇڭ"
                : "请填写信息详情",
            icon: "none",
          });
          return;
        }
      }
      if (u_id == 34) {
        if (this.formData.full_address == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "تەپسىلى ئادرىسىنى تاللاڭ"
                : "请选择详细地址",
            icon: "none",
          });
          return;
        }
        if (this.formData.geometry == "") {
          uni.showToast({
            title: this.$t("dir") == "rtl" ? "كۆلىمىنى تولدۇرۇڭ" : "请填写面积",
            icon: "none",
          });
          return;
        }
        if (this.formData.transfer_year == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? " ئۆتكۈزۈش مۇددىتىنى تاللاڭ"
                : "请填写过户年份",
            icon: "none",
          });
          return;
        }
        if (this.formData.price == 0) {
          uni.showToast({
            title: this.$t("dir") == "rtl" ? "باھاسىنى تولدۇرۇڭ" : "请填写售价",
            icon: "none",
          });
          return;
        }
        if (this.formData.info_content == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "ئۇچۇر تەپسىلاتىنى تولدۇرۇڭ"
                : "请填写信息详情",
            icon: "none",
          });
          return;
        }
      }
      if (u_id == 40) {
        if (this.formData.full_address == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "تەپسىلى ئادرىسىنى تاللاڭ"
                : "请选择详细地址",
            icon: "none",
          });
          return;
        }
        if (this.formData.geometry == "") {
          uni.showToast({
            title: this.$t("dir") == "rtl" ? "كۆلىمىنى تولدۇرۇڭ" : "请填写面积",
            icon: "none",
          });
          return;
        }
        if (this.formData.transfer_type == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? " ئۆتكۈزۈش شەكلىنى تاللاڭ"
                : "请选择过户方式",
            icon: "none",
          });
          return;
        }
        if (this.formData.price == 0) {
          uni.showToast({
            title: this.$t("dir") == "rtl" ? "باھاسىنى تولدۇرۇڭ" : "请填写售价",
            icon: "none",
          });
          return;
        }
        if (this.formData.info_content == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "ئۇچۇر تەپسىلاتىنى تولدۇرۇڭ"
                : "请填写信息详情",
            icon: "none",
          });
          return;
        }
      }
      if (u_id == 41) {
        if (this.formData.full_address == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "تەپسىلى ئادرىسىنى تاللاڭ"
                : "请选择详细地址",
            icon: "none",
          });
          return;
        }
        if (this.formData.person_num == 0) {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "كېرەك ئادەم سانىنى تولدۇرۇڭ"
                : "请填写人数",
            icon: "none",
          });
          return;
        }

        if (this.formData.info_content == "") {
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "ئۇچۇر تەپسىلاتىنى تولدۇرۇڭ"
                : "请填写信息详情",
            icon: "none",
          });
          return;
        }
      }
      if (
        this.formData.yinglax_sani == 0 &&
        !this.formData.edit &&
        this.formData == 0
      ) {
        uni.showToast({
          title:
            this.$t("dir") == "rtl"
              ? "ئۈنۈملۈك ۋاقتىنى تاللاڭ"
              : "请选择有效类型",
          icon: "none",
        });
        return;
      }
      if (this.formData.mobile == "" && this.formData.wechat_code == "") {
        uni.showToast({
          title:
            this.$t("dir") == "rtl"
              ? "تېلفۇن نومۇر ياكى ئىككىلىك كود چوقۇم بىرى بولىشى كېرەك"
              : "手机号或者二维码必须要有一个",
          icon: "none",
        });
        return;
      }
      uni.showLoading({
        title: this.$t("dir") == "rtl" ? "يوللىنىۋاتىدۇ..." : "发布中...",
      });

      try {
        // ئاۋۋال ئۇچۇرنى يوللايمىز
        const postData = this.formData;
        const payRes = await this.$uniapi(
          "/information_list",
          postData,
          "POST"
        );

        if (payRes.code == 200) {
          // WeChat پۇل تۆلەش ئىنتەرفېيسىنى چاقىرىمىز
          uni.requestPayment({
            provider: "wxpay",
            timeStamp: payRes.data.timeStamp,
            nonceStr: payRes.data.nonceStr,
            package: payRes.data.package,
            signType: payRes.data.signType,
            paySign: payRes.data.paySign,
            success: (result) => {
              uni.hideLoading();
              uni.showToast({
                title:
                  this.$t("dir") == "rtl"
                    ? "مۇۋەپپەقىيەتلىك يوللاندى"
                    : "发布成功",
                icon: "success",
                mask: true,
              });

              // 2 سېكۇنتتىن كېيىن ئالدىنقى بەتكە قايتىش
              setTimeout(() => {
                uni.navigateBack();
              }, 2000);
            },
            fail: (err) => {
              console.error(err);
              uni.showToast({
                title:
                  this.$t("dir") == "rtl" ? "تۆلەش مەغلۇپ بولدى" : "支付失败",
                icon: "none",
              });
            },
          });
        }
        if (payRes.code == 999) {
          uni.hideLoading();
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "يوللاش مۇۋاپىقيەتلىك بولدى،تەستىق كۈتۈڭ"
                : "编辑成功，等待审核",
            icon: "none",
          });
          setTimeout(() => {
            uni.navigateBack();
          }, 2000);
        }
        if (payRes.code == 666) {
          uni.hideLoading();
          uni.showToast({
            title:
              this.$t("dir") == "rtl"
                ? "ئوڭشاش مۇۋاپىقيەتلىك بولدى،تەستىق كۈتۈڭ"
                : "编辑成功，等待审核",
            icon: "none",
          });
          setTimeout(() => {
            uni.navigateBack();
          }, 2000);
        }
      } catch (err) {
        console.error(err);
        uni.showToast({
          title: this.$t("dir") == "rtl" ? "خاتالىق كۆرۈلدى" : "发生错误",
          icon: "none",
        });
      } finally {
        this.isSubmitting = false;
        uni.hideLoading();
      }
    },

    selectBaha(item) {
      this.formData.yinglax_sani = item.kitim;
      this.formData.pay_price = item.price;
      this.formData.pay_type = item.id;
    },

    onConfirm1(date) {
      this.showYil = false;
      const selectedDate = new Date(date.value);
      const year = selectedDate.getFullYear();
      const month = selectedDate.getMonth() + 1; // Months are zero-indexed

      // Store the year and month in separate fields
      this.selectedYear = year;
      this.selectedMonth = month;
      var wakit = year + "-" + month;
      console.log(wakit);
      this.formData.car_year = wakit;
      // بۇ يەردە تەستىقلىغان ۋاقىتقا مۇناسىۋەتلىك مەشغۇلاتلارنى قوشۇڭ
    },
    onConfirm2(date) {
      this.showBaoxian = false;
      const selectedDate = new Date(date.value);
      const year = selectedDate.getFullYear();
      const month = selectedDate.getMonth() + 1; // Months are zero-indexed

      // Store the year and month in separate fields
      this.selectedYear = year;
      this.selectedMonth = month;
      var wakit = year + "-" + month;
      console.log(wakit);
      this.formData.car_limits = wakit;
      // بۇ يەردە تەستىقلىغان ۋاقىتقا مۇناسىۋەتلىك مەشغۇلاتلارنى قوشۇڭ
    },
    onConfirm3(date) {
      this.showTakxurux = false;
      const selectedDate = new Date(date.value);
      const year = selectedDate.getFullYear();
      const month = selectedDate.getMonth() + 1; // Months are zero-indexed

      // Store the year and month in separate fields
      this.selectedYear = year;
      this.selectedMonth = month;
      var wakit = year + "-" + month;
      console.log(wakit);

      this.formData.car_vehicle_inspection = wakit;
      // بۇ يەردە تەستىقلىغان ۋاقىتقا مۇناسىۋەتلىك مەشغۇلاتلارنى قوشۇڭ
    },
    showMaysarpiPopup() {
      this.popupMaysarpi = true;
    },
    selectMaysarpi(item) {
      this.formData.car_gear_type = item.value;
      this.maysarpiValue = item;
      this.popupMaysarpi = false;
    },
    showGazPopup() {
      this.popupGaz = true;
    },
    selectGaz(item) {
      this.formData.car_trachea = item.value;
      this.gazValue = item;
      this.popupGaz = false;
    },
    async getPhoneNumber(e) {
      if (e.detail.errMsg === "getPhoneNumber:ok") {
        console.log("phoneData", e.detail.code);
        try {
          const phoneData = {
            phone_code: e.detail.code,
          };

          const res = await this.$uniapi("/user_phone", phoneData, "POST");

          if (res.code === 200) {
            console.log("telfun ", res.data);
            uni.setStorageSync("user", res.data);
            this.showPhonePopup = false;
            this.formData.mobile = res.data.mobile;
            uni.showToast({
              title:
                this.$t("dir") == "rtl"
                  ? "مۇۋەپپەقىيەتلىك ئېرىشتى"
                  : "获取成功",
              icon: "success",
            });
          } else {
            throw new Error(res.msg);
          }
        } catch (err) {
          uni.showToast({
            title: this.$t("dir") == "rtl" ? "مەغلۇپ بولدى" : "获取失败",
            icon: "none",
          });
        }
      } else {
        uni.showToast({
          title: this.$t("dir") == "rtl" ? "ئىجازەت بېرىلمىدى" : "未授权",
          icon: "none",
        });
      }
    },
    showYaxPopup() {
      this.popupYax = true;
    },
    onYaxConfirm(e) {
      this.popupYax = false;
      this.formData.age = parseInt(e.value[0]);
    },
    showJinsPopup() {
      this.popupJins = true;
    },
    selectJins(item) {
      this.jinsValue = item;
      this.formData.gender = item.value;
      this.popupJins = false;
    },
    showOkusPopup() {
      this.popupOkus = true;
    },
    selectOkus(item) {
      this.okusValue = item;
      this.formData.degree = item.value;
      this.popupOkus = false;
    },
    showMaaxPopup() {
      this.popupMaax = true;
    },
    selectMaax(item) {
      this.maaxValue = item;
      this.formData.wages = item.value;
      this.popupMaax = false;
    },
    showOySanPopup() {
      this.popupOySan = true;
    },
    oySanTallax() {
      this.popupOySan = false;
    },
    showEjaraPopup() {
      this.popupEjara = true;
    },
    selectEjara(item) {
      this.ejaraValue = item;
      this.formData.rent_type = item.value;
      this.popupEjara = false;
    },
    showYilPopup() {
      this.popupYil = true;
    },
    selectYil(item) {
      this.yilValue = item;
      this.formData.rent_year = item.value;
      this.popupYil = false;
    },
    showOtPopup() {
      this.popupOt = true;
    },
    onOtConfirm(e) {
      this.popupOt = false;
      let value = e.value[0].split(" ")[0];
      this.formData.transfer_year = parseInt(value);
    },
    showHoddiPopup() {
      this.popupHoddi = true;
    },
    selectHoddi(item) {
      this.hoddiValue = item;
      this.formData.transfer_type = item.value;
      this.popupHoddi = false;
    },
    handleFacePrice() {
      this.formData.price = this.$t("dir") == "rtl" ? "يۈزتۇرانە" : "面议";
      this.popupbaha = false;
    },

    // // تاپشۇرۇش مېتودىدا checkCanSubmit نى چاقىرىش
    // async submit() {
    //   if (this.isSubmitting) return; // تاپشۇرۇۋاتقان بولسا قايتىپ كېتىش

    //   if (this.images.length === 0) {
    //     uni.showToast({
    //       title: this.$t("dir") == "rtl" ? "رەسىم قوشۇڭ" : "请添加图片",
    //       icon: "none",
    //     });
    //     return false;
    //   }

    //   try {
    //     this.isSubmitting = true;
    //     uni.showLoading({
    //       title: this.$t("dir") == "rtl" ? "يوللىنىۋاتىدۇ..." : "发布中...",
    //     });

    //     // رەسىملەرنى يوللاش
    //     if (this.images.length > 0) {
    //       const uploadPromises = this.images.map((image) =>
    //         this.$tools.uploadFile("/upload_image", image).then((res) => {
    //           if (res.code === 200) {
    //             return res.list.data.url;
    //           }
    //           throw new Error(res.msg || "رەسىم يوللاش مەغلۇپ بولدى");
    //         })
    //       );

    //       try {
    //         this.formData.subimg = await Promise.all(uploadPromises);
    //       } catch (error) {
    //         throw new Error("رەسىم يوللاشتا خاتالىق كۆرۈلدى");
    //       }
    //     }

    //     // ئاساسىي ئۇچۇرلارنى يوللاش
    //     const submitData = {
    //       ...this.formData,
    //       id: this.id,
    //       subid: this.subid,
    //       u_id: this.u_id,
    //     };

    //     const res = await this.$uniapi("/submit_post", submitData, "POST");

    //     if (res.code === 200) {
    //       uni.hideLoading();
    //       uni.showToast({
    //         title:
    //           this.$t("dir") == "rtl" ? "مۇۋەپپەقىيەتلىك يوللاندى" : "发布成功",
    //         icon: "success",
    //       });

    //       // 2 سېكۇنتتىن كېيىن ئالدىنقى بەتكە قايتىش
    //       setTimeout(() => {
    //         uni.navigateBack();
    //       }, 2000);
    //     } else {
    //       throw new Error(res.msg || "يوللاش مەغلۇپ بولدى");
    //     }
    //   } catch (error) {
    //     uni.hideLoading();
    //     uni.showToast({
    //       title:
    //         error.message ||
    //         (this.$t("dir") == "rtl" ? "خاتالىق كۆرۈلدى" : "发生错误"),
    //       icon: "none",
    //     });
    //     console.error("Submit error:", error);
    //   } finally {
    //     this.isSubmitting = false;
    //     uni.hideLoading();
    //   }
    // },
    // تاپشۇرۇش ھالىتىنى تەكشۈرۈش
    formatNumberFloors(floorString) {
      if (!floorString) return "";

      // ئەگەر ماسسىۋ بولسا
      if (Array.isArray(floorString)) {
        return floorString;
      }

      // پەش بىلەن ئايرىش
      return floorString.split(",");
    },

    // قەۋەت سانىنى تاللىغاندا
    onFloorConfirm(e) {
      const isRTL = this.$t("dir") === "rtl";
      const totalFloors = e.value[0];
      const currentFloor = e.value[1] || null;

      if (currentFloor) {
        this.formData.number_floors = isRTL
          ? `${totalFloors}قەۋەتلىك بىنا,${currentFloor}-قەۋەت`
          : `${totalFloors}层楼,${currentFloor}层`;
      } else {
        this.formData.number_floors = isRTL
          ? `${totalFloors}-قەۋەت`
          : `${totalFloors}层`;
      }
      this.showKawat = false;
    },
    async loadInitialData() {
      // مۇھىم سانلىق مەلۇماتلارنى يۈكلەش
    },
    async loadSecondaryData() {
      // قوشۇمچە سانلىق مەلۇماتلارنى يۈكلەش
    },
  },
  created() {
    uni.$on("uAvatarCropper", ({ path, keyName }) => {
      // ئاۋۋال يەرلىك رەسىمنى كۆرسىتىمىز
      if (keyName === "qrcode") {
        this.formData.wechat_code_url = path; // يەرلىك ئادرېس
      }
      uni.showLoading({
        title: "يوللىنىۋاتىدۇ",
      });
      const uploadUrl = "/upload_wechat_codes";

      this.$tools
        .uploadFile(uploadUrl, path)
        .then((res) => {
          uni.hideLoading();
          if (res.code == 200) {
            console.log("miyaga kirdi", res.list.data.fullUrl);
            if (keyName === "qrcode") {
              // سېرۋېردىن قايتقان ئادرېسنى ساقلايمىز
              this.formData.wechat_code = res.list.data.url;
              this.formData.wechat_code_url = res.list.data.fullUrl;
            }
            uni.showToast({
              title: "مۇۋەپپەقىيەتلىك يوللاندى",
              icon: "none",
            });
          } else {
            // خاتالىق بولسا يەرلىك رەسىمنى ئۆچۈرۈۋېتىمىز
            this.formData.wechat_code_url = "";
            throw new Error(res.msg || "يوللاش مەغلۇپ بولدى");
          }
        })
        .catch((err) => {
          // خاتالىق بولسا يەرلىك رەسىمنى ئۆچۈرۈۋېتىمىز
          if (keyName === "qrcode") {
            this.formData.wechat_code_url = "";
          }
          uni.hideLoading();
          uni.showToast({
            title: err.message || "تور خاتالىقى",
            icon: "none",
          });
        });
    });
  },
  beforeDestroy() {
    uni.$off("uAvatarCropper");
    if (this.submitTimer) {
      clearTimeout(this.submitTimer);
    }
  },
  watch: {
    yaxValue: {
      handler(newVal) {
        if (newVal) {
          this.formData.age = newVal.label;
        }
      },
      deep: true,
    },
    jinsValue: {
      handler(newVal) {
        if (newVal) {
          this.formData.jins = newVal.label;
        }
      },
      deep: true,
    },
    maaxValue: {
      handler(newVal) {
        if (newVal) {
          this.formData.wages = newVal.value;
        }
      },
      deep: true,
    },
    // formData نى كۆزىتىش
    formData: {
      handler(newVal) {},
      deep: true,
    },
    // formData نى كۆزىتىش
    formData: {
      deep: true,
      handler() {
        this.canSubmit = this.isFormValid;
      },
    },
  },
};
</script>
<style lang="scss">
.popup-content {
  display: flex;
  flex-direction: column; /* 使用列方向排列 */
  align-items: center; /* 居中对齐 */
  box-sizing: border-box;
  padding: 0 50px;
  background: linear-gradient(to left, transparent, #8592e48f, transparent);
}

.popup-head {
  background: #7f8eeca0;
  height: 3px;
  width: 30vw;
  margin-bottom: 30px;
  border-radius: 10rpx;
}

.city-item {
  padding: 10rpx 0;
  margin: 10rpx 0;
  width: 100%;
  text-align: center;
  background: linear-gradient(
    to right,
    transparent,
    rgb(133 175 228 / 34%),
    transparent
  );
  transition: background-color 0.3s; /* 添加过渡效果 */
}

.city-item:hover {
  background-color: #e0f7fa; /* 悬停时的背景色 */
}

.contai {
  padding: 30rpx;
  padding-bottom: 160rpx;
  overflow: hidden;
}
.u-cell__value {
  padding: 0 10px;
}
.cell {
  background: #fff;
  width: 95%;
  overflow: hidden;
  border-radius: 10rpx;
  padding: 10rpx;
  box-sizing: border-box;
  margin: 10rpx auto;
  border: 2rpx dashed rgba(142, 107, 255, 0.3);
}
.content-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 240rpx;
  font-size: 28rpx;
  line-height: 1.5;
  text-align: right;
  direction: rtl;
  padding: 20rpx;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12rpx;
  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 107, 107, 0.1);
}

.container {
  background: #ecf4ff;
  margin-bottom: 30rpx;
  border: 1px solid #455df716;
  border-radius: 10rpx;
  .title {
    margin: 0 20rpx;
    padding-bottom: 10rpx;
    border-bottom: 0.5px dashed #455df716;
  }
}
.title1 {
  padding: 2px 15px 6px;
  font-size: 15px;
}
.media-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15rpx;
  justify-content: flex-end;
  padding: 10rpx;
}

.image-item {
  width: 200rpx;
  height: 200rpx;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
  border-radius: 12rpx;
  border: 2rpx solid rgba(255, 255, 255, 0.8);

  image {
    width: 100%;
    height: 100%;
    border-radius: 12rpx;
    object-fit: cover;
    transition: transform 0.3s;

    &:active {
      transform: scale(0.95);
    }
  }
}

.upload-btn {
  width: 216rpx;
  height: 216rpx;
  background: #ffffff;
  border-radius: 12rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #455ef7;
  transition: all 0.3s;
  border: 2rpx dashed rgb(142 107 255 / 30%);
  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);

  &:active {
    background: rgba(255, 107, 107, 0.05);
    transform: scale(0.95);
  }

  text {
    font-size: 24rpx;
    margin-top: 10rpx;
    color: #666;
  }
}

.delete-btn {
  position: absolute;
  top: 5rpx;
  right: 5rpx;
  width: 40rpx;
  height: 40rpx;
  background: rgba(15, 15, 15, 0.432);
  border-radius: 50%;
  backdrop-filter: blur(4px);
  transition: all 0.3s;
  box-shadow: 0 2rpx 8rpx rgba(255, 107, 107, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;

  &:active {
    transform: scale(0.8);
    background: rgba(255, 107, 107, 1);
  }
}

.submit-btn {
  position: fixed;
  bottom: 40rpx;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 88rpx;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgb(107 135 255 / 20%);
  border-radius: 44rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 32rpx;
  transition: all 0.3s;
  box-shadow: 0 4rpx 16rpx rgba(255, 107, 107, 0.1);
  backdrop-filter: blur(10px);
  z-index: 999;

  &.active {
    background: linear-gradient(45deg, #6babff, #85c8ff);
    border: none;
    color: #fff;
    box-shadow: 0 6rpx 20rpx rgba(107, 176, 255, 0.3);

    &:active {
      transform: translateX(-50%) scale(0.95);
      box-shadow: 0 2rpx 8rpx rgba(107, 144, 255, 0.2);
    }
  }
}
.u-picker__view__column__item {
  color: #000000 !important;
  font-size: 34rpx !important;
}
.u-popup__content {
  background: linear-gradient(
    to top,
    rgba(71, 102, 215, 0.5647058824),
    rgb(196 211 255 / 78%)
  ) !important;
  backdrop-filter: blur(4px) !important;
}
.u-fade-enter-active {
  background-color: #97cafd00 !important;
  backdrop-filter: blur(2px) !important;
}

.u-toolbar {
  border-radius: 40rpx 40rpx 0 0 !important;
  background: #c7cae2 !important;
}
.u-picker__view__column {
  background: radial-gradient(rgba(2, 103, 255, 0.308), transparent) !important;
}
.qrcodebox {
  padding: 10rpx;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 25rpx;
  .qrcode {
    width: 300rpx;
    height: 300rpx;
    background: #f3f3f3;
    border-radius: 25rpx;
  }
}
.bahacontai {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  .bahaitem {
    border: 1px solid #455ef7;
    padding: 10px 0rpx;
    width: 40vw;
    border-radius: 10rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10rpx;
  }
  .bahaitem.active {
    color: #fff;
    font-size: 28rpx;
    font-weight: 500;
    // transform: scale(1.05);
    background: linear-gradient(#455ef7, #4e5dbf);
    transition: all 0.1s ease;
  }
  /* 未选中项的渐变效果 */
  .bahaitem:not(.active) {
    opacity: 0.8;
    transform: scale(0.95);
  }
}
.cell {
  .toast {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
.phone-popup-content {
  width: 600rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30rpx;
}

.phone-title {
  font-size: 28rpx;
  margin-bottom: 40rpx;
  text-align: center;
  line-height: 1.6;
  color: #333;
  padding: 0 20rpx;
}

.phone-btn {
  width: 80%;
  height: 80rpx;
  background: linear-gradient(45deg, #0e76ff, #0058a0);
  color: #ffffff;
  border-radius: 40rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28rpx;
  margin-top: 20rpx;
  box-shadow: 0 4rpx 12rpx rgba(107, 171, 255, 0.3);

  &:active {
    transform: scale(0.98);
    opacity: 0.9;
  }
}

.face-price {
  width: 95%;
  height: 80rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #455ef7, #6c8dff);
  margin: 20rpx;
  font-size: 28rpx;
  color: #fff;
  border-radius: 40rpx;
  box-shadow: 0 4rpx 12rpx rgba(69, 94, 247, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;

  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      45deg,
      transparent,
      rgba(255, 255, 255, 0.1),
      transparent
    );
    transform: translateX(-100%);
    transition: transform 0.5s ease;
  }

  &:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, #3f55e3, #5d7ef0);
    box-shadow: 0 2rpx 8rpx rgba(69, 94, 247, 0.15);
  }

  &:hover::before {
    transform: translateX(100%);
  }
}

.free-post {
  padding: 30rpx;
  margin: 20rpx 0;
  position: relative;
  overflow: hidden;
}

.free-content {
  background: linear-gradient(135deg, #455ef7 0%, #6c8dff 50%, #455ef7 100%);
  background-size: 200% 200%;
  animation: gradientMove 8s ease infinite;
  border-radius: 24rpx;
  padding: 40rpx;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8rpx 32rpx rgba(69, 94, 247, 0.3);
}

.free-content::before {
  content: "";
  position: absolute;
  top: -180%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  animation: shine 3s ease-in-out infinite;
}

.free-content::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  animation: pulse 2s ease-in-out infinite;
}

.free-icon {
  font-size: 80rpx;
  margin-bottom: 20rpx;
  animation: bounce 2s ease infinite;
}

.free-title {
  color: #fff;
  font-size: 44rpx;
  font-weight: bold;
  margin-bottom: 16rpx;
  text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
}

.free-desc {
  color: rgba(255, 255, 255, 0.95);
  font-size: 30rpx;
  margin-bottom: 30rpx;
  text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.1);
}

.free-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  border: 2rpx solid rgba(255, 255, 255, 0.3);
  border-radius: 30rpx;
  padding: 12rpx 40rpx;
  transform: translateY(0);
  animation: float 3s ease-in-out infinite;
}

.badge-text {
  color: #fff;
  font-size: 30rpx;
  font-weight: 600;
  letter-spacing: 2rpx;
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes shine {
  0% {
    transform: translateX(-100%) rotate(30deg);
  }
  100% {
    transform: translateX(200%) rotate(30deg);
  }
}

@keyframes pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 0.6;
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10rpx);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5rpx);
  }
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;

  .skeleton-container {
    position: absolute;
    width: 100%;
    max-width: 90vw;
    padding: 30rpx;

    .skeleton-image {
      width: 100%;
      height: 300rpx;
      background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%);
      background-size: 400% 100%;
      animation: skeleton-loading 1.4s ease infinite;
      border-radius: 12rpx;
      margin-bottom: 20rpx;
    }

    .skeleton-text {
      height: 40rpx;
      background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%);
      background-size: 400% 100%;
      animation: skeleton-loading 1.4s ease infinite;
      border-radius: 6rpx;
      margin-bottom: 20rpx;
    }

    .skeleton-input {
      width: 100%;
      height: 80rpx;
      background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%);
      background-size: 400% 100%;
      animation: skeleton-loading 1.4s ease infinite;
      border-radius: 6rpx;
      margin-bottom: 20rpx;
    }
  }
}

@keyframes skeleton-loading {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}
.fade-enter,
.fade-leave-to {
  opacity: 0;
}
</style>